<!DOCTYPE html>
<html   xmlns="http://www.w3c.org/1999/xhtml"
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:p="http://primefaces.org/ui"
        xmlns:f="http://xmlns.jcp.org/jsf/core">
    <h:head/>
    <h:body>
        <h:outputText value="First works, second doesn't..."/>
        
        <p:mindmap value="#{mindmapBean.root}" style="width:100%;height:600px">
            <p:ajax event="select" listener="#{mindmapBean.onNodeSelect}" />
        </p:mindmap>
        
        <p:mindmap value="#{mindmapBean.root}" style="width:100%;height:600px;">
            <p:ajax event="select" listener="#{mindmapBean.onNodeSelect}" />
            <p:ajax event="dblselect" listener="#{mindmapBean.onNodeDblselect}" update="output" oncomplete="PF('details').show()"/>
        </p:mindmap>
        <p:dialog widgetVar="details" header="Node Details" resizable="false" modal="true" showEffect="fade" hideEffect="fade">
            <h:outputText id="output" value="#{mindmapBean.selectedNode.data}" />
        </p:dialog>
    </h:body>
</html>
